package me.chan.methodReference;

import java.util.Formatter.BigDecimalLayoutForm;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Supplier;

public class MethodReferenceDemo {

	public static void main(String[] args) {
		
		Supplier<Apple> a = Apple::new;
		Apple apple = a.get();
		System.out.println(a.toString());
		System.out.println(apple.toString());
		
		Function<Integer, Apple> t = Apple::new;
		Apple _apple = t.apply(50);
		System.out.println(t.toString());		
		System.out.println(_apple.getWeight());
		
		BiFunction<Integer, String, Apple> bf = Apple::new;
		Apple __apple = bf.apply(62, "red");
		System.out.println(bf.toString());
		System.out.println(__apple.toString());
	}

}
